
#ifndef STATECOINSPOPUP_H
#define STATECOINSPOPUP_H

#include "GameState.h"
#include "Singleton.h"
#include "RenderableEntity.h"
#include "TextEntity.h"
#include "StatePopUp.h"
#include "TimeLineEffect.h"

#define NUM_BUY_COINS_BUTTONS   5

class StateCoinsPopUp : public GameState, public Singleton<StateCoinsPopUp>
{
private:
    
    std::string asBuyCoins[NUM_BUY_COINS_BUTTONS];
    int aiBuyCoinsValues[NUM_BUY_COINS_BUTTONS];

    RenderableEntity* m_oFade;
    RenderableEntity* m_oBg;
    RenderableEntity* m_oRibbon;
    TextEntity* m_oText;

    RenderableEntity* m_oCloseBg;
    TextEntity* m_oClose;
    
    RenderableEntity* m_oButtonBG[NUM_BUY_COINS_BUTTONS];
    TextEntity* m_oButtonText[NUM_BUY_COINS_BUTTONS];
    RenderableEntity* m_oButtonCoin[NUM_BUY_COINS_BUTTONS];
    
    ePopUpState m_eState;
    
    TimeLineEffect* m_oEnter;
    TimeLineEffect* m_oExit;
    
public:
    
	StateCoinsPopUp()
    {
        asBuyCoins[0] = "800";
        asBuyCoins[1] = "2000";
        asBuyCoins[2] = "5000";
        asBuyCoins[3] = "20k";
        asBuyCoins[4] = "100k";

        aiBuyCoinsValues[0] = 800;
        aiBuyCoinsValues[1] = 2000;
        aiBuyCoinsValues[2] = 5000;
        aiBuyCoinsValues[3] = 20000;
        aiBuyCoinsValues[4] = 100000;
    }
    
	~StateCoinsPopUp(){}
    
    void loadContent();
	void unloadContent();
    
	void enter();
    void update(float dt);
    void render();
    void exit();
    
    void popup();
    bool getResult();
};

#endif
